package com.example.demo.web.rest.evt;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @Author zhengmf
 * @Date 2018/12/25  17:24
 */
@ApiModel("保存用户组参数")
public class SaveUserGroupEvt implements Serializable {
    private static final long serialVersionUID = -1926746751615553748L;
    @ApiModelProperty("用户组基本信息")
    private UserGroupEvt userGroup;
    @ApiModelProperty("需要添加的角色id")
    private List<String> addRoleIds;
    @ApiModelProperty("需要删除的角色id")
    private List<String> delRoleIds;
    @ApiModelProperty("需要添加的功能权限id")
    private List<String> addPermissionIds;
    @ApiModelProperty("需要删除的功能权限id")
    private List<String> delPermissionIds;
    @ApiModelProperty("需要添加的资源权限")
    @Valid
    private List<ResourceEvt> addResource;
    @ApiModelProperty("需要删除的资源权限")
    @Valid
    private List<ResourceEvt> delResource;
    @ApiModelProperty("1：新增，2：编辑")
    @NotNull
    private Short type;

    public UserGroupEvt getUserGroup() {
        return userGroup;
    }

    public void setUserGroup(UserGroupEvt userGroup) {
        this.userGroup = userGroup;
    }

    public List<String> getAddRoleIds() {
        return addRoleIds;
    }

    public void setAddRoleIds(List<String> addRoleIds) {
        this.addRoleIds = addRoleIds;
    }

    public List<String> getDelRoleIds() {
        return delRoleIds;
    }

    public void setDelRoleIds(List<String> delRoleIds) {
        this.delRoleIds = delRoleIds;
    }

    public List<String> getAddPermissionIds() {
        return addPermissionIds;
    }

    public void setAddPermissionIds(List<String> addPermissionIds) {
        this.addPermissionIds = addPermissionIds;
    }

    public List<String> getDelPermissionIds() {
        return delPermissionIds;
    }

    public void setDelPermissionIds(List<String> delPermissionIds) {
        this.delPermissionIds = delPermissionIds;
    }

    public List<ResourceEvt> getAddResource() {
        return addResource;
    }

    public void setAddResource(List<ResourceEvt> addResource) {
        this.addResource = addResource;
    }

    public List<ResourceEvt> getDelResource() {
        return delResource;
    }

    public void setDelResource(List<ResourceEvt> delResource) {
        this.delResource = delResource;
    }

    public Short getType() {
        return type;
    }

    public void setType(Short type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "SaveUserGroupEvt{" +
            "userGroup=" + userGroup +
            ", addRoleIds=" + addRoleIds +
            ", delRoleIds=" + delRoleIds +
            ", addPermissionIds=" + addPermissionIds +
            ", delPermissionIds=" + delPermissionIds +
            ", addResource=" + addResource +
            ", delResource=" + delResource +
            ", type=" + type +
            '}';
    }
}
